<template>
  <footer class="footer">
    <router-link to="/home" :class="{ active: $route.path === '/home' }"
      >首页</router-link
    >
    <router-link to="/lines" :class="{ active: $route.path === '/lines' }"
      >线路管理</router-link
    >
  </footer>
</template>

<script setup>
// 无需额外逻辑，直接使用 vue-router
</script>

<style scoped>
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #222c3c;
  color: #fff;
  height: 48px;
  gap: 40px;
}
.router-link-exact-active,
.active {
  color: #42b983;
  font-weight: bold;
  border-bottom: 2px solid #42b983;
}
</style>
